using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Report_GadgetLookupsByState : System.Web.UI.Page
{
    int totalCount;

    protected void Page_Load(object sender, EventArgs e)
    {
        //Ran into a bugs with report datasources so I had to manually create the report
    }
    protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            totalCount += (int)DataBinder.Eval(e.Row.DataItem, "Count");
        }
    }

    protected void GridView1_DataBound(object sender, EventArgs e)
    {
        lblTotal.Text = totalCount.ToString();
    }
}
